#ifndef CLINEEDIT_H
#define CLINEEDIT_H

#include <QDebug>
#include <QLineEdit>

class CLineEdit : public QLineEdit {
    Q_OBJECT
public:
    explicit CLineEdit(QWidget *parent = nullptr);
    explicit CLineEdit(const QString &text, QWidget *parent = nullptr);
    ~CLineEdit() = default;

    void setText(QString text);

protected:
    bool event(QEvent *event) override;
    void focusOutEvent(QFocusEvent *event) override;

private:
    void editFinish();

signals:
    void editFinished();
    void loseFocus();
};


#endif // CLINEEDIT_H
